/*
 * PoissonGenerator.h
 *
 *  Created on: 22-10-2013
 *      Author: Tomasz Lis
 */

#include "omnetpp.h"
#include "packet_m.h"
#ifndef POISSONGENERATOR_H_
#define POISSONGENERATOR_H_

class PoissonGenerator : public cSimpleModule{
public:
    cLongHistogram delaysPois;
    cOutVector delaysPoisVector;

    int numberOfDeletedMinPrior;
    int numberOfDeletedMaxPrior;
    int numberOfDeleted;
    int numberOfForward;


    int classPriority;
    int destinationId;
    int id;
    int lastPacketId;
    int lastSessionId;
    int lambda;
    simtime_t timeUnit;
    simtime_t lastPacketTime;
    PoissonGenerator();
    virtual ~PoissonGenerator();
    void initialize();
    virtual void handleMessage(cMessage *message);
    virtual void finish();
    Packet*  generatePacket(int dst, int classPriority);
};

Define_Module(PoissonGenerator);

#endif /* POISSONGENERATOR_H_ */
